// This file is part of Spectrum Editor Called SECS.
//
// Spectrum Editor Called SECS is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Spectrum Editor Called SECS is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Spectrum Editor Called SECS.  If not, see <http://www.gnu.org/licenses/>.

#include <cmath>
#include <algorithm>
#include <complex>
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <sys/ioctl.h>
#include <stdio.h>
#include <unistd.h>

#include "Wave.h"
#include "Signal.h"
#include "Analysis.h"

int main(int argc, char *argv[]) {
  struct winsize w;
  ioctl(STDOUT_FILENO, TIOCGWINSZ, &w);
  int width = w.ws_col - 5;
  int height = w.ws_row;

  Wave wave(argv[1]);

  int window_size = 1024;

  Signal signal(wave);

  Analysis analysis(window_size, signal);
  analysis.analyze(width, height);

  return 0;
}

